package apiUtils.apis.account;

import android.content.Context;

import org.json.JSONException;

import apiUtils.params.Params;
import constant.ApiConstants;

/**
 * 解绑接口
 */

public class RemoveBindingAccountAPI extends BaseAccountAPI {
    private static final String tag = "RemoveBindingAccountAPI";
    private static final String url = ApiConstants.DOMAIN_NAME + "unbindAccount";
    private String mDeviceId;

    public RemoveBindingAccountAPI(Context context) {
        super(context);
    }

    public void removeBindingAccount(String subType, String accountId,  String deviceId,final Listener listener) {
        mSubType = subType;
        mUserAccount = accountId;
        mDeviceId = deviceId;
        post(tag, url, listener);
    }

    @Override
    protected Params initParams() throws JSONException {
        initAccountParams();
        mApiParams.put("accountId", mUserAccount);
        mApiParams.put("deviceId", mDeviceId);
        return mApiParams;
    }
}
